
package com.chengyu.eyc.model;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;

import org.springframework.format.annotation.DateTimeFormat;

import com.chengyu.eyc.enums.OrderStatusEnum;
import com.chengyu.eyc.enums.PayStatusEnum;
import com.chengyu.eyc.utils.EycGenId;
import com.fasterxml.jackson.annotation.JsonFormat;

import tk.mybatis.mapper.annotation.KeySql;

@Table(name = "EYC_ORDER")
public class EycOrder extends BaseModel implements Serializable {

    private static final long serialVersionUID = 1L;

    @KeySql(genId = EycGenId.class)
    @Id
    @Column(name = "ORDER_ID")
    private String orderId;

    /**
     * 订单号
     */
    @Column(name = "ORDER_NUM")
    private String orderNum;

    /**
     * 客户
     */
    @Column(name = "USER_ID")
    private String userId;

    @Column(name = "OPENID")
    private String openid;

    /**
     * 订单状态
     */
    @Column(name = "STATUS")
    private String status;

    /**
     * 支付状态
     */
    @Column(name = "PAY_STATUS")
    private String payStatus;

    /**
     * 车牌号
     */
    @Column(name = "PLATE_NUM")
    private String plateNum;

    /**
     * 指定检测站
     */
    @Column(name = "INSP_STATION_ID")
    private String inspStationId;

    /**
     * 接车地址
     */
    @Column(name = "ADDR")
    private String addr;

    /**
     * 预约时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @Column(name = "APPOINTMENT_DT")
    private Date appointmentDt;
    
    /**
     * 审核时间
     */
    @Column(name = "AUDIT_TIME")
    private Date auditTime;
    
    /**
     * 审核人
     */
    @Column(name = "AUDIT_PERSON")
    private String auditPerson;

    /**
     * 联系人
     */
    @Column(name = "CONTACT")
    private String contact;

    /**
     * 联系电话
     */
    @Column(name = "CONTACT_NUM")
    private String contactNum;

    /**
     * 金额
     */
    @Column(name = "PRICE")
    private BigDecimal price;

    /**
     * 优惠金额
     */
    @Column(name = "PREFERENTIAL_PRICE")
    private BigDecimal preferentialPrice;

    /**
     * 优惠券金额
     */
    @Column(name = "COUPON_PRICE")
    private BigDecimal couponPrice;

    /**
     * 优惠券
     */
    @Column(name = "COUPON_ID")
    private String couponId;

    /**
     * 是否上门提车
     */
    @Column(name = "IS_DOOR_PICK_UP")
    private Boolean isDoorPickUp;

    /**
     * 提车时间
     */
    @Column(name = "PICK_UP_TIME")
    private String pickUpTime;

    @Column(name = "REMARK")
    private String remark;
    

    /**
     * 申请退款备注
     */
    @Column(name = "REFUND_REMARK")
    private String refundRemark;
    
    /**
     * 订单审核备注
     */
    @Column(name = "AUDIT_REMARK")
    private String auditRemark;
    
    /**
     * 订单取消时间
     */
    @Column(name = "CANCEL_TIME")
    private Date cancelTime;

    /**
     * 订单支付时间
     */
    @Column(name = "PAID_TIME")
    private Date paidTime;

    /**
     * 退款时间
     */
    @Column(name = "REFUND_TIME")
    private Date refundTime;
    

    /**
     * 订单核销执行人
     */
    @Column(name = "VERIFICATION_PERSON")
    private String verificationPerson;

    /**
     * 订单核销时间
     */
    @Column(name = "VERIFICATION_TIME")
    private Date verificationTime;

    /**
     * @return the addr
     */
    public String getAddr() {
        return addr;
    }

    /**
     * 获取预约时间
     *
     * @return APPOINTMENT_DT - 预约时间
     */
    public Date getAppointmentDt() {
        return appointmentDt;
    }

    /**
     * 获取审核人
     *
     * @return AUDIT_PERSON - 审核人
     */
    public String getAuditPerson() {
        return auditPerson;
    }

    /**
     * 获取订单审核备注
     *
     * @return AUDIT_REMARK - 订单审核备注
     */
    public String getAuditRemark() {
        return auditRemark;
    }

    /**
     * 获取审核时间
     *
     * @return AUDIT_TIME - 审核时间
     */
    public Date getAuditTime() {
        return auditTime;
    }

    /**
     * 获取订单取消时间
     *
     * @return CANCEL_TIME - 订单取消时间
     */
    public Date getCancelTime() {
        return cancelTime;
    }

    /**
     * 获取联系人
     *
     * @return CONTACT - 联系人
     */
    public String getContact() {
        return contact;
    }

    /**
     * 获取联系电话
     *
     * @return CONTACT_NUM - 联系电话
     */
    public String getContactNum() {
        return contactNum;
    }

    /**
     * 获取优惠券
     *
     * @return COUPON_ID - 优惠券
     */
    public String getCouponId() {
        return couponId;
    }
    
    
    /**
     * 获取优惠券金额
     *
     * @return COUPON_PRICE - 优惠券金额
     */
    public BigDecimal getCouponPrice() {
        return couponPrice;
    }

    

    /**
     * 获取指定检测站
     *
     * @return INSPECTION_STATION_ID - 指定检测站
     */
    public String getInspStationId() {
        return inspStationId;
    }

    /**
     * 获取是否上门提车
     *
     * @return IS_DOOR_PICK_UP - 是否上门提车
     */
    public Boolean getIsDoorPickUp() {
        return isDoorPickUp;
    }

    /**
     * @return OPENID
     */
    public String getOpenid() {
        return openid;
    }

    /**
     * @return ORDER_ID
     */
    public String getOrderId() {
        return orderId;
    }

    /**
     * 获取订单号
     *
     * @return ORDER_NUM - 订单号
     */
    public String getOrderNum() {
        return orderNum;
    }

    /**
     * 获取订单支付时间
     *
     * @return PAID_TIME - 订单支付时间
     */
    public Date getPaidTime() {
        return paidTime;
    }

    /**
     * 获取支付状态
     *
     * @return PAY_STATUS - 支付状态
     */
    public String getPayStatus() {
        return payStatus;
    }

    public String getPayStatusNme() {
        return PayStatusEnum.getPayStatusNme(getPayStatus());
    }

    /**
     * 获取提车时间
     *
     * @return PICK_UP_TIME - 提车时间
     */
    public String getPickUpTime() {
        return pickUpTime;
    }

    /**
     * 获取车牌号
     *
     * @return PLATE_NUM - 车牌号
     */
    public String getPlateNum() {
        return plateNum;
    }

    /**
     * 获取优惠金额
     *
     * @return PREFERENTIAL_PRICE - 优惠金额
     */
    public BigDecimal getPreferentialPrice() {
        return preferentialPrice;
    }

    /**
     * 获取金额
     *
     * @return PRICE - 金额
     */
    public BigDecimal getPrice() {
        return price;
    }

    /**
     * 获取申请退款备注
     *
     * @return REFUND_REMARK - 申请退款备注
     */
    public String getRefundRemark() {
        return refundRemark;
    }

    /**
     * 获取退款时间
     *
     * @return REFUND_TIME - 退款时间
     */
    public Date getRefundTime() {
        return refundTime;
    }

    /**
     * @return REMARK
     */
    public String getRemark() {
        return remark;
    }

    /**
     * 获取订单状态
     *
     * @return STATUS - 订单状态
     */
    public String getStatus() {
        return status;
    }

    public String getStatusNme() {
        return OrderStatusEnum.getOrderStatusNme(getStatus());
    }

    /**
     * 获取客户
     *
     * @return USER_ID - 客户
     */
    public String getUserId() {
        return userId;
    }

    /**
     * 获取订单核销执行人
     *
     * @return VERIFICATION_PERSON - 订单核销执行人
     */
    public String getVerificationPerson() {
        return verificationPerson;
    }

    /**
     * 获取订单核销时间
     *
     * @return VERIFICATION_TIME - 订单核销时间
     */
    public Date getVerificationTime() {
        return verificationTime;
    }

    /**
     * @param addr the addr to set
     */
    public void setAddr(String addr) {
        this.addr = addr;
    }

    /**
     * 设置预约时间
     *
     * @param appointmentDt 预约时间
     */
    public void setAppointmentDt(Date appointmentDt) {
        this.appointmentDt = appointmentDt;
    }

    /**
     * 设置审核人
     *
     * @param auditPerson 审核人
     */
    public void setAuditPerson(String auditPerson) {
        this.auditPerson = auditPerson == null ? null : auditPerson.trim();
    }

    /**
     * 设置订单审核备注
     *
     * @param auditRemark 订单审核备注
     */
    public void setAuditRemark(String auditRemark) {
        this.auditRemark = auditRemark == null ? null : auditRemark.trim();
    }

    /**
     * 设置审核时间
     *
     * @param auditTime 审核时间
     */
    public void setAuditTime(Date auditTime) {
        this.auditTime = auditTime;
    }

    /**
     * 设置订单取消时间
     *
     * @param cancelTime 订单取消时间
     */
    public void setCancelTime(Date cancelTime) {
        this.cancelTime = cancelTime;
    }

    /**
     * 设置联系人
     *
     * @param contact 联系人
     */
    public void setContact(String contact) {
        this.contact = contact == null ? null : contact.trim();
    }

    /**
     * 设置联系电话
     *
     * @param contactNum 联系电话
     */
    public void setContactNum(String contactNum) {
        this.contactNum = contactNum == null ? null : contactNum.trim();
    }
    
    /**
     * 设置优惠券
     *
     * @param couponId 优惠券
     */
    public void setCouponId(String couponId) {
        this.couponId = couponId == null ? null : couponId.trim();
    }

    /**
     * 设置优惠券金额
     *
     * @param couponPrice 优惠券金额
     */
    public void setCouponPrice(BigDecimal couponPrice) {
        this.couponPrice = couponPrice;
    }

    /**
     * 设置指定检测站
     *
     * @param inspectionStationId 指定检测站
     */
    public void setInspStationId(String inspStationId) {
        this.inspStationId = inspStationId == null ? null : inspStationId.trim();
    }

    /**
     * 设置是否上门提车
     *
     * @param isDoorPickUp 是否上门提车
     */
    public void setIsDoorPickUp(Boolean isDoorPickUp) {
        this.isDoorPickUp = isDoorPickUp;
    }

    /**
     * @param openid
     */
    public void setOpenid(String openid) {
        this.openid = openid == null ? null : openid.trim();
    }

    /**
     * @param orderId
     */
    public void setOrderId(String orderId) {
        this.orderId = orderId == null ? null : orderId.trim();
    }

    /**
     * 设置订单号
     *
     * @param orderNum 订单号
     */
    public void setOrderNum(String orderNum) {
        this.orderNum = orderNum == null ? null : orderNum.trim();
    }

    /**
     * 设置订单支付时间
     *
     * @param paidTime 订单支付时间
     */
    public void setPaidTime(Date paidTime) {
        this.paidTime = paidTime;
    }

    /**
     * 设置支付状态
     *
     * @param payStatus 支付状态
     */
    public void setPayStatus(String payStatus) {
        this.payStatus = payStatus == null ? null : payStatus.trim();
    }

    /**
     * 设置提车时间
     *
     * @param pickUpTime 提车时间
     */
    public void setPickUpTime(String pickUpTime) {
        this.pickUpTime = pickUpTime == null ? null : pickUpTime.trim();
    }
    
    /**
     * 设置车牌号
     *
     * @param plateNum 车牌号
     */
    public void setPlateNum(String plateNum) {
        this.plateNum = plateNum == null ? null : plateNum.trim();
    }

    /**
     * 设置优惠金额
     *
     * @param preferentialPrice 优惠金额
     */
    public void setPreferentialPrice(BigDecimal preferentialPrice) {
        this.preferentialPrice = preferentialPrice;
    }
    
    /**
     * 设置金额
     *
     * @param price 金额
     */
    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    /**
     * 设置申请退款备注
     *
     * @param refundRemark 申请退款备注
     */
    public void setRefundRemark(String refundRemark) {
        this.refundRemark = refundRemark == null ? null : refundRemark.trim();
    }
    
    /**
     * 设置退款时间
     *
     * @param refundTime 退款时间
     */
    public void setRefundTime(Date refundTime) {
        this.refundTime = refundTime;
    }
    
    /**
     * @param remark
     */
    public void setRemark(String remark) {
        this.remark = remark == null ? null : remark.trim();
    }
   
    /**
     * 设置订单状态
     *
     * @param status 订单状态
     */
    public void setStatus(String status) {
        this.status = status == null ? null : status.trim();
    }

    /**
     * 设置客户
     *
     * @param userId 客户
     */
    public void setUserId(String userId) {
        this.userId = userId == null ? null : userId.trim();
    }
    
    /**
     * 设置订单核销执行人
     *
     * @param verificationPerson 订单核销执行人
     */
    public void setVerificationPerson(String verificationPerson) {
        this.verificationPerson = verificationPerson == null ? null : verificationPerson.trim();
    }

    /**
     * 设置订单核销时间
     *
     * @param verificationTime 订单核销时间
     */
    public void setVerificationTime(Date verificationTime) {
        this.verificationTime = verificationTime;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", orderId=").append(orderId);
        sb.append(", orderNum=").append(orderNum);
        sb.append(", userId=").append(userId);
        sb.append(", openid=").append(openid);
        sb.append(", status=").append(status);
        sb.append(", payStatus=").append(payStatus);
        sb.append(", plateNum=").append(plateNum);
        sb.append(", inspStationId=").append(inspStationId);
        sb.append(", appointmentDt=").append(appointmentDt);
        sb.append(", auditTime=").append(auditTime);
        sb.append(", auditPerson=").append(auditPerson);
        sb.append(", contact=").append(contact);
        sb.append(", contactNum=").append(contactNum);
        sb.append(", price=").append(price);
        sb.append(", preferentialPrice=").append(preferentialPrice);
        sb.append(", couponPrice=").append(couponPrice);
        sb.append(", couponId=").append(couponId);
        sb.append(", isDoorPickUp=").append(isDoorPickUp);
        sb.append(", pickUpTime=").append(pickUpTime);
        sb.append(", addr=").append(addr);
        sb.append(", cancelTime=").append(cancelTime);
        sb.append(", paidTime=").append(paidTime);
        sb.append(", refundTime=").append(refundTime);
        sb.append(", verificationPerson=").append(verificationPerson);
        sb.append(", verificationTime=").append(verificationTime);
        sb.append(", remark=").append(remark);
        sb.append(", refundRemark=").append(refundRemark);
        sb.append(", auditRemark=").append(auditRemark);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }

}